package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `gorm:"type:char(11);not null;comment:手机号"`
	Password string `gorm:"type:char(32);comment:密码"`
}

func (u *User) UserInfo(Tel string) error {
	return DB.Where("tel = ?", Tel).Limit(1).Find(&u).Error
}
